The invention generally relates to implantable medical devices and in particular to methods and apparatus for timing events within implantable medical devices capable of performing concurrent multiple processes, tasks or functions.
A wide range of implantable medical devices used for cardiac rhythm management are provided for surgical implantation into humans or animals. Examples of cardiac rhythm management devices are cardiac pacemakers and cardioverter/defibrillators (ICD). Other examples include devices for stimulating or sensing portions of the brain, spinal cord, muscles, bones, nerves, glands or other body organs or tissues. State of the art implantable medical devices are typically configured to perform a variety of tasks concurrently. For example, a pacemaker or ICD may analyze cardiac rhythm signals received from the heart to identify any arrhythmias to permit therapy to be applied. Concurrently, the pacemaker or ICD may monitor the battery or other power source of the device to verify that the power source is capable of providing the appropriate voltage and current for functions such as pacing or defibrillation. Likewise, the device may concurrently monitor the impedance of leads connected to the heart to verify that there are no faults in the leads. Some functions are unique to the particular implantable medical device. For example, an ICD contains capacitors for use in generating a defibrillation pulse. For proper operation, the capacitor needs to be reformed periodically every two to four months to prevent charge time degradation. Accordingly, the ICD periodically performs a capacitor reformation function. A wide variety of other tasks maybe performed as well by the implantable medical device. In many cases, the tasks are performed by a microprocessor of the device. In other cases, separate dedicated hardware components of the device are employed.
Many of the tasks performed by the implantable medical device require that certain periods of time be tracked to facilitate completion of the task. For example, to analyze cardiac rhythm signals, the corresponding function may require that each cardiac pulse, i.e. each individual or components of the QRS complex, be timed with respect to others. As such, a timer capable of measuring time lasting in the order of a few to hundredths of milliseconds is required. For other functions, such as monitoring the power source or the leads or for performing capacitor reformation, the time periods that need to be timed are on the order of minutes, hours, weeks, months, or years.
To time an event, a software component such as (but not limited to) a task, object, function, subroutine, in-line code, interrupt service routine, operating system call, mainline code, etc.) typically makes a request to a timer manager or operating system component. The request specifies that an interrupt be generated by a hardware timer incorporated within the device following the expiration of a predetermined amount of time (or that some other timer completion signal be generated). For timing short-term events, such as events spanning only a few milliseconds, a timer with eight or sixteen bits may be required. To time even longer events, such as events spanning hours, weeks, months, or years, a timer having sufficient memory bits (32, 64 or 128 bits) to register the long periods of time is required. Such timers are also commonly found in desktop computers, laptop commuters, cellular telephones and the like. To accommodate the possibility of several concurrent processes, several such timers are often employed, each providing high timing resolution and others having sufficient memory to accommodate long time duration.
However, within implantable medical devices it is critical that the size of the device and the amount of power consumed by the device be minimized. Power must be minimized to ensure that the power supply lasts for several years. The size of the device must be minimized to make it as light as possible to reduce discomfort to the patient after the device has been implanted. Unfortunately, with implantable medical devices implemented using timing devices as described above, neither device power nor device size is minimized. A set of hardware timers each counting time in parallel is an undesirable expenditure of power.
Size of the device is not effectively minimized because each timer requires a large number of memory registers to accommodate the potentially large timing periods. Hence, the physical size of an integrated circuit or other device used to implement the timer is not minimized. Moreover, with each timer configured to accommodate long timing periods, considerable current is consumed powering the many memory registers of the counter.
As noted, if multiple concurrent processes need to be timed, the implantable medical device is often configured to provide several timers each providing high timing resolution and having sufficient memory to accommodate long timing durations. Accordingly, power consumption and device size increases accordingly. Furthermore, to accommodate the multiple processes and the multiple timers, numerous timer requests need to be generated and tracked, resulting in an increase in the overall system complexity.
Thus, it would be desirable to provide an improved hardware timing system for use within an implantable medical device and it is to that end that aspects of the invention are primarily directed.
In accordance with the invention, a device is provided for timing hardware or software events for use in an implantable medical device capable of performing a plurality of concurrent processes using a hardware timer capable of timing events up to a pre-determined maximum period of time. Means are provided for receiving timer requests from the plurality of processes with each timer request specifying a time delay before a timer interrupt or other timer completion signal is required, wherein the time delay of each individual timer request is no greater than the maximum period of time. The device includes a timer request processing means for controlling the hardware timing means to issue interrupt signals or other timer completion signals based upon the time delays of the timer request requests. The timing request processing means determines, upon receipt of each new timer request, the next timer request that needs to be timed and the time remaining to issue the next interrupt or other timer completion signal and sequentially controlling the timing means to time each remaining period of time between successive timer requests.
In an exemplary embodiment of the invention, the device is either an implantable cardioverter defibrillator or a pacemaker. The hardware timing means is a downcount hardware timer having a resolution of about one millisecond. The timing request processing means employs a pseudo clock, which is an arbitrary record of elapsed time having an effective timing resolution of about one millisecond. Both the hardware timer and the timing request processing means employ counters storing two bytes of information, incremented by one bit after each timing interval. The maximum pre-determined period of time is about sixty-four seconds.
By employing the concept of the pseudo clock, the device may efficiently time a plurality of concurrent processes using only a single hardware timer. Hence, a separate timer is not required for each process and a substantial reduction in power and required circuit space is achieved. Also, the overall system complexity is reduced as compared to a system requiring coordination of multiple timers.
Other objects and advantages of the invention are provided as well. Method embodiments of the invention are also provided. Preferably, an implantable medical device configured in accordance with the invention implements and exploits both the first and second aspects of the invention by employing both short-term and long-term timers, each having an associated pseudo clock.